]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
legacyTray: Pass on keyboard events to the icon
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 19 Mar 2015 22:07:12 +0000 (23:07 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 22 Mar 2015 08:33:33 +0000 (09:33 +0100)
There is currently no way to trigger an icon's right-click menu by
keyboard. While there's a good chance that the icon will ignore
<shift>F10 and similar shortcuts, passing on key events will at
least make it work for some icons ...

https://bugzilla.gnome.org/show_bug.cgi?id=746487

js/ui/legacyTray.js

index 57a756a4bf7eb5d40bec960c211ff1e048926679..42927ef6df13f4836e2d8cfb46a112d1ff33881b 100644 (file)
@@ -162,6 +162,11 @@ const LegacyTray = new Lang.Class({
             function() {
                 icon.click(Clutter.get_current_event());
             });
+        button.connect('key-press-event',
+            function() {
+                icon.click(Clutter.get_current_event());
+                return Clutter.EVENT_PROPAGATE;
+            });
         button.connect('key-focus-in', Lang.bind(this,
             function() {
                 this._concealHandle.show();